local skynet = require "skynet"
local timer = require "core.timer"

skynet.start(function()
    local timer = require "core.timer"
    timer.everySec(function()
        print("every sec", os.date("%Y-%m-%d %H:%M:%S"))
    end)

    timer.everySec(function()
        print("every sec immediate", os.date("%Y-%m-%d %H:%M:%S"))
    end, true)

    timer.everyMin(function()
        print("---------every min at start", os.date("%Y-%m-%d %H:%M:%S"))
    end, true)

    timer.everyMin(function()
        print("---------every min not at start", os.date("%Y-%m-%d %H:%M:%S"))
    end)

    timer.everyMin(function()
        print("---------every min immediate", os.date("%Y-%m-%d %H:%M:%S"))
    end, nil, true)
end)
